package com.symaster.gameengine.e2d.transform;

import com.symaster.gameengine.core.Component;

/**
 * @author yinmiao
 * @version 2023/11/15
 */
public class Transform extends Component {
    public float x;
    public float y;
    public float angle;

    public Transform() {
        this.x = 0;
        this.y = 0;
        this.angle = 0;
    }

    public void xAdd(float x) {
        this.x += x;
    }

    public void yAdd(float y) {
        this.y += y;
    }

    public float getX() {
        return x;
    }

    public void setX(float x) {
        this.x = x;
    }

    public float getY() {
        return y;
    }

    public void setY(float y) {
        this.y = y;
    }

    public float getAngle() {
        return angle;
    }

    public void setAngle(float angle) {
        this.angle = angle;
    }

    @Override
    public String toString() {
        return "Transform{" +
                "x=" + x +
                ", y=" + y +
                ", angle=" + angle +
                "} " + super.toString();
    }
}
